Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.Data.SqlClient
Imports System.Text
Imports System.Data
Namespace WorkFlow.BBL
    Public Class CodeMappingBBL
        Public Function GetData(ByVal TableName As String, ByVal ColumnName As String, ByVal dbName As String) As DataTable
            Dim db1 As WorkFlow.DAO.CodeMappingDAO = New WorkFlow.DAO.CodeMappingDAO(dbName)
            Return db1.GetData(TableName, ColumnName)
        End Function
        Public Sub InsertData(ByVal TableName As String, ByVal ColumnName As String, ByVal Value As String, ByVal Text As String, ByVal Active As String, ByVal ChnText As String, ByVal EngText As String, ByVal UID As String, ByVal dbName As String)
            Dim db1 As WorkFlow.DAO.CodeMappingDAO = New WorkFlow.DAO.CodeMappingDAO(dbName)
            db1.InsertData(TableName, ColumnName, Value, Text, Active, ChnText, EngText, UID)
        End Sub
        Public Sub UpdateData(ByVal Text As String, ByVal ChnText As String, ByVal EngText As String, ByVal Active As String, ByVal ID As String, ByVal dbName As String)
            Dim db1 As WorkFlow.DAO.CodeMappingDAO = New WorkFlow.DAO.CodeMappingDAO(dbName)
            db1.UpdateData(Text, ChnText, EngText, Active, ID)
        End Sub
        Public Function GetddlTableNameItem(ByVal dbName As String) As DataTable
            Dim db1 As WorkFlow.DAO.CodeMappingDAO = New WorkFlow.DAO.CodeMappingDAO(dbName)
            Return db1.GetddlTableNameItem()
        End Function
        Public Function GetddlColumnNameItem(ByVal TableName As String, ByVal dbName As String) As DataTable
            Dim db1 As WorkFlow.DAO.CodeMappingDAO = New WorkFlow.DAO.CodeMappingDAO(dbName)
            Return db1.GetddlColumnNameItem(TableName)
        End Function
        Public Function CodeMappingIsExist(ByVal TableName As String, ByVal ColumnName As String, ByVal Value As String, ByVal dbName As String) As Boolean
            Dim db1 As WorkFlow.DAO.CodeMappingDAO = New WorkFlow.DAO.CodeMappingDAO(dbName)
            Return db1.CodeMappingIsExist(TableName, ColumnName, Value)
        End Function
        Public Function CodeMappingIDIsExist(ByVal TableName As String, ByVal ColumnName As String, ByVal Value As String, ByVal ID As String, ByVal dbName As String) As Boolean
            Dim db1 As WorkFlow.DAO.CodeMappingDAO = New WorkFlow.DAO.CodeMappingDAO(dbName)
            Return db1.CodeMappingIDIsExist(TableName, ColumnName, Value, ID)
        End Function
        Public Sub DeleteData(ByVal ID As String, ByVal dbName As String)
            Dim db1 As WorkFlow.DAO.CodeMappingDAO = New WorkFlow.DAO.CodeMappingDAO(dbName)
            db1.DeleteData(ID)
        End Sub
 
    End Class
End Namespace
